Working with and Creating Textures in Fireworks
Table of Contents
Creating a Texture
Setting Up the Source Object
Here's how to line up a texture, using a bubbles texture as an example. The bubbles texture is obviously a repeating pattern (see Figures 11 and 12 below), but it’s not so obvious where the pattern starts and ends, and this is your goal.
-
Download and unzip the sample files that are linked at the beginning of this article. Then import the bubble.stl style from the sample files into Fireworks. Follow these steps to import the bubble style in Fireworks.
- Open Fireworks and select the Styles panel. You can find the Styles panel by choosing Window > Styles, if it is not already visible.
- Click the options icon in the top right corner of the Styles panel and choose Import Styles.
- Select the Style files you downloaded and extracted and click OK to import them.
- Create a new file (File > New) with an oversized canvas size with a width of 400 pixels and a height of 300 pixels. Texture files are normally small files with small dimensions, but planning them on an oversized canvas gives you room to see how the pattern is unfolding.
- Using the rectangle tool, draw a square that is 48 X 48 pixels. You can first draw the square and then resize it in the Property inspector.
- Within the Property inspector, adjust the position of the square. Set the X coordinate to 40 and the Y coordinate to 0.
-
Select the square and apply the bubble style to it. To do this, open the Styles panel (Window > Styles) and click the bubble style.
Note: For information on styles, see my two styles articles, Fireworks MX 2004 Styles Sample Files and Creating Styles in Fireworks.) You object should now look similar to Figure 9 below. However, the pattern will be slightly different. If you have problems with the above steps or you want your file to look identical to the screen shot, you can use the source.png file that is available in the sample files linked at the beginning of this article.
- Save your work using a filename of your choice.
-
Close the file and open the source.png file.
Note: The above steps are crucial to understanding how to create textures, however, the file you created is slightly different from the screen shots in this article. You may become frustrated with the differences, so I recommend using the source.png file as a starting point for the remainder of the article.
In this example, you are using a simple square as a source with one of my bubble styles applied. This is a simple way to get the look of an almost-random pattern. For your other projects, you may prefer to simply use a group of objects or even bitmaps.
Figure 9. A simple square with the bubble texture applied
Cloning the Object
Now you will create several identical copies, or clones, of the object and place them next to each other.
- Select the object, and select Edit > Clone.
- Move it horizontally using the right arrow key.
- Repeat step 2 two more times.
- Move the objects horizontally using the arrow keys so that they overlap in a way that looks natural (spacing depends on the actual texture). Your objects should look similar to figure 10 below. Again, if you want your file to look exactly like figure 10, use the source.png file as a starting point for cloning the object.
In more complex textures where you are using several objects as your source pattern, you may wish to group them (Shift-select them, and then select Modify > Group) to make moving them easier.
Figure 10. The square object with the bubble style cloned and repeated horizontally
Next you will clone the group of objects so they repeat vertically.
- Select all objects (Select > Select All).
- Clone (Edit > Clone) and move the objects vertically downwards using the downward arrow key.
- Repeat step 2 two more times with the repetitions equally spaced so that the image looks natural as shown in Figure 11 below.
Figure 11. The object cloned vertically and horizontally
If you're wondering why you have repeated the texture, here's the answer. The ultimate aim is to crop the document so that it creates an overlapped tile that is seamless. You will need at least three by three tiles to do this to ensure the start and end of the previous and next tiles appear within the boundary of a single tile. Depending on how closely the texture objects repeat, you may need more repetitions to show the entire texture within a single tile.
Inverting the Color
Remember that textures only lighten an object, and also that dark areas of the texture become light areas. If you want the texture to have the same effect as it does above, you need to invert all the colors. Use the following steps to do this.
Figure 12. The finished texture before the color has been inverted
- Choose Select > Select All to group all the objects. The point of grouping all objects is to avoid Fireworks replacing any live effects already being used on different objects. In the this example, you are only using a single object, so this wouldn't happen, but if you use multiple objects with different effects, this becomes an issue. It’s a good habit to get into.
- Apply the Invert Live Effect by clicking the Effects Plus (+) button in the Property inspector and select Adjust Color > Invert. It should now look like Figure 13 below (without the slice). If the color is not inverted, ensure that the object was selected before applying the Invert effect.
Preparing the Finished Texture for Export
There are two ways to prepare and export the finished texture. You can crop it, or you can slice it and export the sliced image. I will review both methods.
As shown in Figure 13 below, use the slice tool to slice a single tile, or use the crop tool to crop it. The objective here is to size and position the slice so that it repeats seamlessly as I described earlier. You need to line up elements to ensure smooth transition between tiles. This is the tricky part, and you will probably need to try it several times to get it right. This is where your old friend the Undo command comes in handy (ctrl > Z or Edit > Undo). You can make fine modifications using the numeric width and height fields in the Property inspector.
That may seem difficult, but it is relatively easy to find the appropriate area to slice or crop in this example because the source shape was a simple square (the stroke provided the interest). Depending on the complexity of your work, finding the exact position of a tile may be more difficult. Try to find an identifying point on the tile that marks the edge of each repetition. Again, this will take some practice, and I suggest trying several straightforward examples before moving on to anything too difficult.
Figure 13. The ending texture sliced and ready to export
The texture is now ready to export.
Exporting the Texture
Cropping Method: If you used cropping method to export the texture, select File > Export Preview and choose the most suitable Fireworks-compatible format (PNG, JPG, GIF, BMP, etc.) and click the Export button. When you export, you can, if you wish, resize your output by adjusting the size of your object in the File tab of the Export Preview dialog box. For this example, leave the file size as is. Changing the file size is an advantage of the cropping method that the slicing method doesn't offer.
Slicing Method: If you used the slicing method to prepare the texture for export, use these steps to export the slice.
- Select File > Export.
-
When the Export dialog box appears:
- Name the file with a name of your choosing.
- Check the Selected slices only checkbox.
- Unselect the Include areas without slices checkbox.
- Click the Save button.
Figure 14. The texture after it’s been cropped and exported
Where you export your texture to depends on whether you are intending to use it on a single project, or whether you expect to use it regularly. For single project usage, it's best to save the source file and export the texture to the directory where you are storing all the images for that project. When you need to call the texture, you can choose Other from the texture pop-up menu in the Property inspector and point to your file. (Other is the last option in the list of textures.)
If you want to load the texture every time Fireworks loads, store it in the directory used by the standard Fireworks textures. This directory location depends on your operating system. On Windows platforms, this is C:\\Program Files\Macromedia\Fireworks MX 2004\Configuration\Textures. On Macintosh, this is HardDrive | Applications | Macromedia Fireworks MX 2004 | Configuration | Textures.
You will need to exit and re-launch Fireworks for the texture to be available.
Note: The sample files linked from the beginning of this article also include some other textures I created that you can play around with.
Applying the Texture to an Object
Use the following steps to apply the texture to an object:
- Ensure you have exited and restarted Fireworks so that the new texture shows up in the texture pop-up menu.
- Open a new file in Fireworks (File > New) with a canvas size of 700 x 500 pixels.
- Select the rectangle tool, change the fill to dark blue, and draw a square that fills the majority of the canvas.
- Select the square you just drew and select the bubble texture you just created in the Texture pop-up menu in the Property inspector.
Repeat these steps with objects of various colors to experiment. If you notice that the tiles are not lining up, refer to the steps and advice in the Preparing the Finished Texture for Export section above.
That concludes this article on working with textures; I hope you have enjoyed it! If you haven't already done so and are interested in learning about working with styles in Fireworks, check out my other Developer Center articles, Fireworks MX 2004 Styles Sample Files and Creating Styles in Fireworks.